IF exists(SELECT * FROM dbo.sysobjects WHERE name='WEB_seminaries' AND xtype='P') 
BEGIN
	DROP PROCEDURE WEB_seminaries
END
GO

create  procedure WEB_seminaries
as
set nocount on

select '0AAAA' as klas,'<?xml version="1.0"  encoding="ISO-8859-1" ?><groepen>' as tekst
union
select groepsnaam,'<groep code="' + isNull(groepscode,'') + '">' + isNull(groepsnaam,'') + '</groep>'
from seminarieNamen
union
select 'ZZZZZ','</groepen>'
order by klas